package learnDecorate.homewordTao.coffee.Zuoliao;

import learnDecorate.homewordTao.coffee.abstract1.Coffee;
import learnDecorate.homewordTao.coffee.abstract1.Zuoliao;

/**
 * @author jiangfeng 2018/7/25 18:28
 * 子类香草,继承抽象父类佐料
 */
public class XiangCao extends Zuoliao {
	private Coffee coffee;
	public XiangCao(Coffee coffee){
		this.coffee = coffee;
	}

	@Override
	public String getDesc() {
		return coffee.getDesc() + ", 加香草";
	}

	@Override
	public double price() {
		return coffee.price() + 6;
	}
}
